package Herencia;

public class Ejercicio1 {
	
	static CuentaCorriente c1;
	static CuentaAhorro c2;

	public static void main(String[] args) {
		
		Titular t1 = new Titular("Juan", "Sanchez", 22);
        Titular t2 = new Titular("Leandro", "Valenziano", 39);
        
        c1 = new CuentaCorriente(t1, "1");
        c2 = new CuentaAhorro(t2, "2", 1.5);
        
        System.out.println(c1.toString());
        System.out.println(c2.toString());
		
        c1.depositar(15000);
        c2.depositar(8000);
        
        System.out.println(c1.toString());
        System.out.println(c2.toString());
        
        c1.extraer(1200);
        c2.extraer(500);
        
        System.out.println(c1.toString());
        System.out.println(c2.toString());
        
        
		

	}

}
